#include<bits/stdc++.h>
using namespace std;
int a[100005];
bool f[100005];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+1+n);
	int sum=0,pre=0,cnt=0;
	for(int i=1;i<=n;i++){
		if(a[i]!=a[i-1]) sum+=pre,pre=1;
		else pre++;
		if(sum) sum--;
	}
	sum+=pre;
	cout<<sum<<endl;

	return 0;
}
//1 2 3 4 5
//dui yu mei ge guai, zhao dao bi ta xiao de zui da di shu